 {% extends 'base.html'%}
        {% block content %}
        <div class="container">
            <div>
                {% autoescape off %}
                    {{con_item_list.content}}
                {% endautoescape %}
            </div>
            <div class="reviewList">
                <h4>评论列表</h4>
               {% for comment_item in comment_list %}
                <hr>
                 <div><span>用户名:{{comment_item.user.username}}</span><span>评论时间:{{comment_item.comment_time}}</span></div>
                <div>{{comment_item.text}}</div>
                {% empty%}
                暂无评论
                {% endfor%}
            </div>
            <hr>


            <h4>你的评论</h4>
            <div class="huifu">
                {% if user.is_authenticated %}
                <form action="{% url 'updata_comment' %}" method="POST">
                     {% csrf_token%}
                    <textarea rows="10" style="width:100%" name="text"></textarea >
                    <input type="hidden"  name="comment_id" value="{{con_item_list.id}}">
                    <input type="submit" value="评论">
                </form>
                {% else %}
                <!--判断是不是登录,没有登录让用户去登录-->
                <div class="login_prompt">
                    <span>您未登录,请登录后在评论</span>
                    <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal">请登录</button>
                </div>
                {% endif %}
            </div>
        </div>
 {%  endblock content %}

